package org.util;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintWriter;

public class Persistence {

	private PrintWriter pw;

	public Persistence(String path) {
		try {
			this.pw = new PrintWriter(path);
		} catch (FileNotFoundException e) {
			System.out.println("地址错误");
		}
	}
	
	/**
	 * 写出数据到本地
	 */
	private void print() {
		String path = "D:" + File.separator + "学习" + File.separator + "APP" + File.separator + "素材"
				+ File.separator + "72x72\\uris.txt";

		PrintWriter pw = null;
		try {
			pw = new PrintWriter(path);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		
		pw.println("阿斯利康绝对会");
		
		pw.flush();
		
		pw.close();
		
		System.out.println("---------------");

	}
	public static void main(String[] args) throws FileNotFoundException {

		String path = "D:" + File.separator + "学习" + File.separator + "APP" + File.separator + "素材"
				+ File.separator + "72x72\\uris.txt";
		
		OutputStream os = new FileOutputStream(new File(path));

		PrintWriter pw = new PrintWriter(os,true);
		
		pw.println("阿斯利康绝q对会");
		
	
		
		System.out.println("---------------");

	}

}
